<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>

</head>
<body>

    <h1>二维码登陆</h1>

    <img src="https://login.weixin.qq.com/qrcode/{{session_id}}">

    <script src={{static_url("js/jquery-1.8.2.min.js")}}></script>
    <script type="text/javascript">

        $(function () {
            check_login();
        });

        function check_login(){

            $.ajax({
                url: "/login",
                type: 'POST',
                success : function(callback){
                    if(callback == "200"){
                        window.location.href = "/index"
                    }else{
                        check_login();
                    }


                },
                error: function(){


                }
            })
        }


    </script>

</body>
</html>